package com.epam.OOP.coffee;

import com.epam.OOP.cargo.CargoBuilder;
import com.epam.OOP.utils.PropertiesReader;

import java.util.ArrayList;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: Yelena_M
 * Date: 04.08.13
 * Time: 17:21
 * To change this template use File | Settings | File Templates.
 */
public class RobustaCoffeeBuilder extends CargoBuilder{
    private PropertiesReader propertiesReader = new PropertiesReader();

    public RobustaCoffeeBuilder() {
    }

    public void buildVolume() {
        cargo.setVolume(Integer.parseInt(propertiesReader.getProperties("robustaCoffeeVolume")));
    }

    public void buildPrice() {
        cargo.setPrice(Integer.parseInt(propertiesReader.getProperties("robustaCoffeePrice")));
    }

    public void buildWeight() {
        cargo.setWeight(Integer.parseInt(propertiesReader.getProperties("robustaCoffeeWeight")));
    }

    public void buildAdditionalParameters() {
        List<String> parameters = new ArrayList<String>();
        parameters.add(Sorts.ROBUSTA.toString());
        parameters.add(PhysicalStates.GROUND.toString());
        parameters.add(Packing.BOX.toString());

        cargo.setParameters(parameters);
    }

}
